home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / OCE.p < prev    next >
Encoding:
Text File  |  1997-08-12  |  49.9 KB  |  1,331 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        OCE.p
  3.  
  4.      Contains:    Apple Open Collaboration Environment (AOCE) Interfaces.
  5.  
  6.      Version:    Technology:    AOCE Toolbox 1.02
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1994-1997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT OCE;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __OCE__}
  28. {$SETC __OCE__ := 1}
  29.  
  30. {$I+}
  31. {$SETC OCEIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __ALIASES__}
  38. {$I Aliases.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __APPLEEVENTS__}
  41. {$I AppleEvents.p}
  42. {$ENDC}
  43.  
  44.  
  45. {$PUSH}
  46. {$ALIGN MAC68K}
  47. {$LibExport+}
  48.  
  49. { All utility routines defined here are callable at interrupt level. }
  50.  
  51. TYPE
  52.     OCERecordTypeIndex                    = INTEGER;
  53.     OCEAttributeTypeIndex                = INTEGER;
  54. { For anyone who absolutely needs a define of the body of the standard record or
  55. attribute type, use these below.  CAUTION!  All the types below are assumed to be
  56. in character set 'smRoman'.  If you try to compare these to some RString or
  57. AttributeType variable, you must take the character set code into account.  Future
  58. standard types may be defined using character sets other than 'smRoman'. }
  59.  
  60. { All these standard definitions begin with the Apple symbol (not shown here).
  61.  
  62. NOTE:  To access these, you must call OCEGetIndRecordType or OCEGetIndAttributeType
  63. with the proper index.  These routines return pointers to the standard type.
  64. This was done so that code fragments (INITs, CDEVs, CSAMs, etc). which cannot
  65. use global data can also use these. }
  66. { Indices for the standard definitions for certain record types (OCERecordTypeIndex): }
  67.  
  68. CONST
  69.     kUserRecTypeNum                = 1;                            {  "User"  }
  70.     kGroupRecTypeNum            = 2;                            {  "Group"  }
  71.     kMnMRecTypeNum                = 3;                            {  "AppleMail™ M&M"  }
  72.     kMnMForwarderRecTypeNum        = 4;                            {  "AppleMail™ Fwdr"  }
  73.     kNetworkSpecRecTypeNum        = 5;                            {  "NetworkSpec"  }
  74.     kADAPServerRecTypeNum        = 6;                            {  "ADAP Server"  }
  75.     kADAPDNodeRecTypeNum        = 7;                            {  "ADAP DNode"  }
  76.     kADAPDNodeRepRecTypeNum        = 8;                            {  "ADAP DNode Rep"  }
  77.     kServerSetupRecTypeNum        = 9;                            {  "Server Setup"  }
  78.     kDirectoryRecTypeNum        = 10;                            {  "Directory"  }
  79.     kDNodeRecTypeNum            = 11;                            {  "DNode"  }
  80.     kSetupRecTypeNum            = 12;                            {  "Setup"  }
  81.     kMSAMRecTypeNum                = 13;                            {  "MSAM"  }
  82.     kDSAMRecTypeNum                = 14;                            {  "DSAM"  }
  83.     kAttributeValueRecTypeNum    = 15;                            {  "Attribute Value"  }
  84.     kBusinessCardRecTypeNum        = 16;                            {  "Business Card"  }
  85.     kMailServiceRecTypeNum        = 17;                            {  "Mail Service"  }
  86.     kCombinedRecTypeNum            = 18;                            {  "Combined"  }
  87.     kOtherServiceRecTypeNum        = 19;                            {  "Other Service"  }
  88.     kAFPServiceRecTypeNum        = 20;                            {  "Other Service afps"  }
  89.     kFirstOCERecTypeNum            = 1;                            {  first standard OCE record type  }
  90.     kLastOCERecTypeNum            = 20;                            {  last standard OCE record type  }
  91.     kNumOCERecTypes                = 20;
  92.  
  93. { Indices for the standard definitions for certain attribute types (OCEAttributeTypeIndex): }
  94.     kMemberAttrTypeNum            = 1001;                            {  "Member"  }
  95.     kAdminsAttrTypeNum            = 1002;                            {  "Administrators"  }
  96.     kMailSlotsAttrTypeNum        = 1003;                            {  "mailslots"  }
  97.     kPrefMailAttrTypeNum        = 1004;                            {  "pref mailslot"  }
  98.     kAddressAttrTypeNum            = 1005;                            {  "Address"  }
  99.     kPictureAttrTypeNum            = 1006;                            {  "Picture"  }
  100.     kAuthKeyAttrTypeNum            = 1007;                            {  "auth key"  }
  101.     kTelephoneAttrTypeNum        = 1008;                            {  "Telephone"  }
  102.     kNBPNameAttrTypeNum            = 1009;                            {  "NBP Name"  }
  103.     kQMappingAttrTypeNum        = 1010;                            {  "ForwarderQMap"  }
  104.     kDialupSlotAttrTypeNum        = 1011;                            {  "DialupSlotInfo"  }
  105.     kHomeNetAttrTypeNum            = 1012;                            {  "Home Internet"  }
  106.     kCoResAttrTypeNum            = 1013;                            {  "Co-resident M&M"  }
  107.     kFwdrLocalAttrTypeNum        = 1014;                            {  "FwdrLocalRecord"  }
  108.     kConnectAttrTypeNum            = 1015;                            {  "Connected To"  }
  109.     kForeignAttrTypeNum            = 1016;                            {  "Foreign RLIs"  }
  110.     kOwnersAttrTypeNum            = 1017;                            {  "Owners"  }
  111.     kReadListAttrTypeNum        = 1018;                            {  "ReadList"  }
  112.     kWriteListAttrTypeNum        = 1019;                            {  "WriteList"  }
  113.     kDescriptorAttrTypeNum        = 1020;                            {  "Descriptor"  }
  114.     kCertificateAttrTypeNum        = 1021;                            {  "Certificate"  }
  115.     kMsgQsAttrTypeNum            = 1022;                            {  "MessageQs"  }
  116.     kPrefMsgQAttrTypeNum        = 1023;                            {  "PrefMessageQ"  }
  117.     kMasterPFAttrTypeNum        = 1024;                            {  "MasterPF"  }
  118.     kMasterNetSpecAttrTypeNum    = 1025;                            {  "MasterNetSpec"  }
  119.     kServersOfAttrTypeNum        = 1026;                            {  "Servers Of"  }
  120.     kParentCIDAttrTypeNum        = 1027;                            {  "Parent CID"  }
  121.     kNetworkSpecAttrTypeNum        = 1028;                            {  "NetworkSpec"  }
  122.     kLocationAttrTypeNum        = 1029;                            {  "Location"  }
  123.     kTimeSvrTypeAttrTypeNum        = 1030;                            {  "TimeServer Type"  }
  124.     kUpdateTimerAttrTypeNum        = 1031;                            {  "Update Timer"  }
  125.     kShadowsOfAttrTypeNum        = 1032;                            {  "Shadows Of"  }
  126.     kShadowServerAttrTypeNum    = 1033;                            {  "Shadow Server"  }
  127.     kTBSetupAttrTypeNum            = 1034;                            {  "TB Setup"  }
  128.     kMailSetupAttrTypeNum        = 1035;                            {  "Mail Setup"  }
  129.     kSlotIDAttrTypeNum            = 1036;                            {  "SlotID"  }
  130.     kGatewayFileIDAttrTypeNum    = 1037;                            {  "Gateway FileID"  }
  131.     kMailServiceAttrTypeNum        = 1038;                            {  "Mail Service"  }
  132.     kStdSlotInfoAttrTypeNum        = 1039;                            {  "Std Slot Info"  }
  133.     kAssoDirectoryAttrTypeNum    = 1040;                            {  "Asso. Directory"  }
  134.     kDirectoryAttrTypeNum        = 1041;                            {  "Directory"  }
  135.     kDirectoriesAttrTypeNum        = 1042;                            {  "Directories"  }
  136.     kSFlagsAttrTypeNum            = 1043;                            {  "SFlags"  }
  137.     kLocalNameAttrTypeNum        = 1044;                            {  "Local Name"  }
  138.     kLocalKeyAttrTypeNum        = 1045;                            {  "Local Key"  }
  139.     kDirUserRIDAttrTypeNum        = 1046;                            {  "Dir User RID"  }
  140.     kDirUserKeyAttrTypeNum        = 1047;                            {  "Dir User Key"  }
  141.     kDirNativeNameAttrTypeNum    = 1048;                            {  "Dir Native Name"  }
  142.     kCommentAttrTypeNum            = 1049;                            {  "Comment"  }
  143.     kRealNameAttrTypeNum        = 1050;                            {  "Real Name"  }
  144.     kPrivateDataAttrTypeNum        = 1051;                            {  "Private Data"  }
  145.     kDirTypeAttrTypeNum            = 1052;                            {  "Directory Type"  }
  146.     kDSAMFileAliasAttrTypeNum    = 1053;                            {  "DSAM File Alias"  }
  147.     kCanAddressToAttrTypeNum    = 1054;                            {  "Can Address To"  }
  148.     kDiscriminatorAttrTypeNum    = 1055;                            {  "Discriminator"  }
  149.     kAliasAttrTypeNum            = 1056;                            {  "Alias"  }
  150.     kParentMSAMAttrTypeNum        = 1057;                            {  "Parent MSAM"  }
  151.     kParentDSAMAttrTypeNum        = 1058;                            {  "Parent DSAM"  }
  152.     kSlotAttrTypeNum            = 1059;                            {  "Slot"  }
  153.     kAssoMailServiceAttrTypeNum    = 1060;                            {  "Asso. Mail Service"  }
  154.     kFakeAttrTypeNum            = 1061;                            {  "Fake"  }
  155.     kInheritSysAdminAttrTypeNum    = 1062;                            {  "Inherit SysAdministrators"  }
  156.     kPreferredPDAttrTypeNum        = 1063;                            {  "Preferred PD"  }
  157.     kLastLoginAttrTypeNum        = 1064;                            {  "Last Login"  }
  158.     kMailerAOMStateAttrTypeNum    = 1065;                            {  "Mailer AOM State"  }
  159.     kMailerSendOptionsAttrTypeNum = 1066;                        {  "Mailer Send Options"  }
  160.     kJoinedAttrTypeNum            = 1067;                            {  "Joined"  }
  161.     kUnconfiguredAttrTypeNum    = 1068;                            {  "Unconfigured"  }
  162.     kVersionAttrTypeNum            = 1069;                            {  "Version"  }
  163.     kLocationNamesAttrTypeNum    = 1070;                            {  "Location Names"  }
  164.     kActiveAttrTypeNum            = 1071;                            {  "Active"  }
  165.     kDeleteRequestedAttrTypeNum    = 1072;                            {  "Delete Requested"  }
  166.     kGatewayTypeAttrTypeNum        = 1073;                            {  "Gateway Type"  }
  167.     kFirstOCEAttrTypeNum        = 1001;                            {  first standard OCE attr type  }
  168.     kLastOCEAttrTypeNum            = 1073;                            {  last standard OCE attr type  }
  169.     kNumOCEAttrTypes            = 73;
  170.  
  171.  
  172. { Miscellaneous enums: }
  173.     kRString32Size                = 32;                            {  max size of the body field in RString32  }
  174.     kRString64Size                = 64;                            {  max size of the body field in RString64  }
  175.     kNetworkSpecMaxBytes        = 32;                            {  max size of the body field in NetworkSpec  }
  176.     kPathNameMaxBytes            = 1024;                            {  max size of the data field in PackedPathName  }
  177.     kDirectoryNameMaxBytes        = 32;                            {  max size of the body field in DirectoryName  }
  178.     kAttributeTypeMaxBytes        = 32;                            {  max size of the body field in AttributeType  }
  179.     kAttrValueMaxBytes            = 65536;                        {  max size of any attribute value  }
  180.     kRStringMaxBytes            = 256;                            {  max size (in bytes) of the body field of a recordName or recordType  }
  181.     kRStringMaxChars            = 128;                            {  max size (in chars) of the body field of a recordName or recordType  }
  182.  
  183.     kNULLDNodeNumber            = 0;                            {  Special value meaning none specified  }
  184.     kRootDNodeNumber            = 2;                            {  DNodeNum corresponding to the root of the tree  }
  185.  
  186.  
  187. { This enum is used to select the kind of RString in calls such as OCERelRString,
  188. OCEEqualRString, and OCEValidRString.
  189.  
  190. eGenericSensitive and eGenericInsensitive are enumerators that can be used if you
  191. use RStrings for things other than what you see in this file.  If you want them to
  192. be compared in a case- and diacritical-sensitive manner (c ≠ C ≠ ç), use
  193. eGenericSensitive.  If you want them to be compared in a case- and diacritical-
  194. insensitive manner (c = C = ç), use eGenericInensitive.
  195. WARNING:  do not use eGenericSensitive and eGenericInsensitive with catalog
  196. names, entity names, pathname parts, entity types, network specs, or attribute
  197. types!  Don't assume that you know how they should be compared!!! }
  198.     kOCEDirName                    = 0;
  199.     kOCERecordOrDNodeName        = 1;
  200.     kOCERecordType                = 2;
  201.     kOCENetworkSpec                = 3;
  202.     kOCEAttrType                = 4;
  203.     kOCEGenericSensitive        = 5;
  204.     kOCEGenericInsensitive        = 6;
  205.  
  206.  
  207. TYPE
  208.     RStringKind                            = INTEGER;
  209. { Values for the signature field in Discriminator }
  210.  
  211. CONST
  212.     kDirAllKinds                = 0;
  213.     kDirADAPKind                = 'adap';
  214.     kDirPersonalDirectoryKind    = 'pdir';
  215.     kDirDSAMKind                = 'dsam';
  216.  
  217.  
  218.  
  219. TYPE
  220.     OCEDirectoryKind                    = LONGINT;
  221. { Values returned by GetDSSpecInfo() }
  222.  
  223. CONST
  224.     kOCEInvalidDSSpec            = $3F3F3F3F;                    {  '????' could not be determined  }
  225.     kOCEDirsRootDSSpec            = 'root';                        {  root of all catalogs ("Catalogs" icon)  }
  226.     kOCEDirectoryDSSpec            = 'dire';                        {  catalog  }
  227.     kOCEDNodeDSSpec                = 'dnod';                        {  d-node  }
  228.     kOCERecordDSSpec            = 'reco';                        {  record  }
  229.     kOCEentnDSSpec                = 'entn';                        {  extensionType is 'entn'  }
  230.     kOCENOTentnDSSpec            = 'not ';                        {  extensionType is not 'entn'  }
  231.  
  232.  
  233. { Values for AttributeTag }
  234.     typeRString                    = 'rstr';
  235.     typePackedDSSpec            = 'dspc';
  236.     typeBinary                    = 'bnry';
  237.  
  238.  
  239. { Bit flag corresponding to the canContainRecords bit.  Use it like this:
  240.     if (foo & kCanContainRecords)
  241.         then this dNode can contain records!
  242. kForeignNode is used to indicate nodes in the name hierarchy that correspond to
  243. foreign catalogs (meaning ADAP sees no clusters or DNodes beneath it, but
  244. mail routers might be able to route to clusters beneath it. }
  245.     kCanContainRecordsBit        = 0;
  246.     kForeignNodeBit                = 1;
  247.  
  248. { DirNodeKind }
  249.     kCanContainRecords            = $00000001;
  250.     kForeignNode                = $00000002;
  251.  
  252.  
  253. TYPE
  254.     DirNodeKind                            = LONGINT;
  255.  
  256.  
  257. {*** Toolbox Control ***}
  258. { We will have a version number and attributes for toolboxes off the aa5e trap
  259. and the S&F server trap.
  260.  
  261. This includes the OCE toolbox and S&F Server.  [Note: the S&F server will
  262. change to ONLY service ServerGateway calls —it will then be necessary to run
  263. it co–resident with an OCE toolbox].
  264.  
  265. The high order word will represent the S&F Server version number.  The low
  266. order word will represent the OCE toolbox version number.  These will be zero
  267. until the component is up and running.  It is not possible to know these
  268. a–priori. Note: there will not be a seperate version numbers for each component
  269. in the OCE toolbox or S&F server.
  270.  
  271. The above is consistent with the standard System 7.0 usage of Gestalt.
  272.  
  273. The oce tb attribute gestaltOCETBPresent implies the existence of OCE on a
  274. machine.
  275.  
  276. The OCE TB attribute gestaltOCETBAvailable implies the availablity of OCE calls.
  277.  
  278. The attribute gestaltOCESFServerAvailable implies the availablity of OCE calls
  279. available through the S&F server. This are essentially the server gateway calls.
  280.  
  281. Any (future) remaining OCE attributes may not be established correctly until
  282. the attribute gestaltOCETBAvailable is set.
  283.  
  284. }
  285.  
  286. {    Constants used for Transitions. }
  287.  
  288. CONST
  289.     ATTransIPMStart                = 'ipms';
  290.     ATTransIPMShutdown            = 'ipmd';
  291.     ATTransDirStart                = 'dirs';
  292.     ATTransDirShutdown            = 'dird';
  293.     ATTransAuthStart            = 'auts';
  294.     ATTransAuthShutdown            = 'autd';
  295.     ATTransSFStart                = 's&fs';
  296.     ATTransSFShutdown            = 's&fd';
  297.  
  298.  
  299.  
  300. { Some definitions for time-related parameters: }
  301. { Interpreted as UTC seconds since 1/1/1904 }
  302.  
  303. TYPE
  304.     UTCTime                                = LONGINT;
  305. { seconds EAST of Greenwich }
  306.     UTCOffset                            = LONGINT;
  307. { This is the same as the ScriptManager script. }
  308.     CharacterSet                        = INTEGER;
  309. {*** RString ***}
  310.  
  311. { struct RString is a maximum-sized structure.  Allocate one of these and it will
  312. hold any valid RString. }
  313.     RStringPtr = ^RString;
  314.     RString = RECORD
  315.         charSet:                CharacterSet;
  316.         dataLength:                INTEGER;
  317.         body:                    PACKED ARRAY [0..255] OF Byte;            {  place for characters  }
  318.     END;
  319.  
  320. { struct ProtoRString is a minimum-sized structure.  Use this for a variable-length RString. }
  321.     ProtoRStringPtr = ^ProtoRString;
  322.     ProtoRString = RECORD
  323.         charSet:                CharacterSet;
  324.         dataLength:                INTEGER;
  325.     END;
  326.  
  327.     RStringHandle                        = ^RStringPtr;
  328.     RString64Ptr = ^RString64;
  329.     RString64 = RECORD
  330.         charSet:                CharacterSet;
  331.         dataLength:                INTEGER;
  332.         body:                    PACKED ARRAY [0..63] OF Byte;
  333.     END;
  334.  
  335.     RString32Ptr = ^RString32;
  336.     RString32 = RECORD
  337.         charSet:                CharacterSet;
  338.         dataLength:                INTEGER;
  339.         body:                    PACKED ARRAY [0..31] OF Byte;
  340.     END;
  341.  
  342. { Standard definitions for the entity type field and attribute type
  343. have been moved to the end of the file. }
  344.  
  345. { Copies str1 to str2.  str2Length is the size of str2, excluding header.
  346. A memFull error will be returned if that is not as large as str1->dataLength. }
  347. FUNCTION OCECopyRString({CONST}VAR str1: RString; VAR str2: RString; str2Length: INTEGER): OSErr;
  348.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  349.     INLINE $303C, $0308, $AA5C;
  350.     {$ENDC}
  351.  
  352. {    Make an RString from a C string.  If the c string is bigger than rStrLength,
  353. only rStrLength bytes will be copied. (rStrLength does not include the header size) }
  354. PROCEDURE OCECToRString(cStr: ConstCStringPtr; charSet: CharacterSet; VAR rStr: RString; rStrLength: INTEGER);
  355.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  356.     INLINE $303C, $0339, $AA5C;
  357.     {$ENDC}
  358.  
  359. {    Make an RString from a Pascal string.  If the Pascal string is bigger than rStrLength,
  360. only rStrLength bytes will be copied. (rStrLength does not include the header size) }
  361. PROCEDURE OCEPToRString(pStr: ConstStr255Param; charSet: CharacterSet; VAR rStr: RString; rStrLength: INTEGER);
  362.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  363.     INLINE $303C, $033A, $AA5C;
  364.     {$ENDC}
  365.  
  366. {    Make a Pascal string from an RString.  It's up to you to check the char set of
  367. the RString, or if the length of the RString is greater than 255 (the Pascal string's
  368. length will simply be the lower byte of the RString's length).  The StringPtr that is
  369. returned will point directly into the RString (no memory will be allocated). }
  370. FUNCTION OCERToPString(rStr: RStringPtr): StringPtr;
  371.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  372.     INLINE $303C, $033B, $AA5C;
  373.     {$ENDC}
  374. {    Check the relative equality of two RStrings.  Determines if str1 is greater than,
  375. equal to, or less than str2.  Result types for OCERelRString are defined in <OSUtils.h>
  376. (same as for RelString). }
  377. FUNCTION OCERelRString(str1: UNIV Ptr; str2: UNIV Ptr; kind: RStringKind): INTEGER;
  378.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  379.     INLINE $303C, $032D, $AA5C;
  380.     {$ENDC}
  381.  
  382. {    Check for equality of two RStrings. Returns true if equal. }
  383. FUNCTION OCEEqualRString(str1: UNIV Ptr; str2: UNIV Ptr; kind: RStringKind): BOOLEAN;
  384.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  385.     INLINE $303C, $0316, $AA5C;
  386.     {$ENDC}
  387.  
  388. {    Check the validity of an RString.  Returns true if the RString is valid }
  389. FUNCTION OCEValidRString(str: UNIV Ptr; kind: RStringKind): BOOLEAN;
  390.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  391.     INLINE $303C, $0338, $AA5C;
  392.     {$ENDC}
  393.  
  394. {*** CreationID ***}
  395.  
  396. TYPE
  397.     CreationIDPtr = ^CreationID;
  398.     CreationID = RECORD
  399.         source:                    LONGINT;                                {  Fields definitions and usage are not defined  }
  400.         seq:                    LONGINT;
  401.     END;
  402.  
  403.     AttributeCreationID                    = CreationID;
  404.     AttributeCreationIDPtr                 = ^AttributeCreationID;
  405.  
  406. { Returns a pointer to a null CreationID . }
  407. FUNCTION OCENullCID: CreationIDPtr;
  408.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  409.     INLINE $303C, $0344, $AA5C;
  410.     {$ENDC}
  411.  
  412. { Returns a pointer to a special CreationID used within the PathFinder. }
  413. FUNCTION OCEPathFinderCID: CreationIDPtr;
  414.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  415.     INLINE $303C, $033C, $AA5C;
  416.     {$ENDC}
  417.  
  418. { Sets the CreationID to a null value. }
  419. PROCEDURE OCESetCreationIDtoNull(VAR cid: CreationID);
  420.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  421.     INLINE $303C, $032E, $AA5C;
  422.     {$ENDC}
  423.  
  424. { Copies the value of cid1 to cid2. }
  425. PROCEDURE OCECopyCreationID({CONST}VAR cid1: CreationID; VAR cid2: CreationID);
  426.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  427.     INLINE $303C, $0300, $AA5C;
  428.     {$ENDC}
  429.  
  430. { Check the equality of two CreationIDs. }
  431. FUNCTION OCEEqualCreationID({CONST}VAR cid1: CreationID; {CONST}VAR cid2: CreationID): BOOLEAN;
  432.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  433.     INLINE $303C, $030C, $AA5C;
  434.     {$ENDC}
  435.  
  436. {*** NetworkSpec ***}
  437. { For the record, a NetworkSpec is an RString with a smaller maximum size.
  438. I don't just typedef it to an RString, because I want the definition of the NetworkSpec
  439. struct to contain the max length.  But it should be possible to typecast any
  440. NetworkSpec to an RString and use all the RString utilities on it. }
  441.  
  442. TYPE
  443.     NetworkSpecPtr = ^NetworkSpec;
  444.     NetworkSpec = RECORD
  445.         charSet:                CharacterSet;
  446.         dataLength:                INTEGER;
  447.         body:                    PACKED ARRAY [0..31] OF Byte;            {  always fixed at the max size  }
  448.     END;
  449.  
  450.  
  451. {*** PackedPathName ***}
  452. { struct PackedPathName is a maximum-sized structure.  Allocate one of
  453. these and it will hold any valid packed pathname. }
  454.     PackedPathNamePtr = ^PackedPathName;
  455.     PackedPathName = RECORD
  456.         dataLength:                INTEGER;                                {  dataLength excludes the space for the dataLength field  }
  457.         data:                    PACKED ARRAY [0..1021] OF Byte;
  458.     END;
  459.  
  460. { struct ProtoPackedPathName is a minimum-sized structure.  Use this
  461. for a variable-length packed PathName. }
  462.     ProtoPackedPathNamePtr = ^ProtoPackedPathName;
  463.     ProtoPackedPathName = RECORD
  464.         dataLength:                INTEGER;                                {  dataLength excludes the space for the dataLength field  }
  465.                                                                         {  Followed by data  }
  466.     END;
  467.  
  468. {
  469. Copy the contents of path1 to path2.  path2Length is the size of path2, and must
  470. be large enough to hold a copy of path1.  A memFull error will be returned if that
  471. is not the case.
  472. }
  473. FUNCTION OCECopyPackedPathName({CONST}VAR path1: PackedPathName; VAR path2: PackedPathName; path2Length: INTEGER): OSErr;
  474.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  475.     INLINE $303C, $0304, $AA5C;
  476.     {$ENDC}
  477.  
  478. {
  479. Returns true if packed path pointer is nil, or is of zero length, or is of
  480. length 2 and nParts of zero.
  481. }
  482. FUNCTION OCEIsNullPackedPathName({CONST}VAR path: PackedPathName): BOOLEAN;
  483.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  484.     INLINE $303C, $031D, $AA5C;
  485.     {$ENDC}
  486.  
  487. {
  488. OCEUnpackPathName breaks apart the path into its component RStrings, writing string
  489. pointers into the array 'parts', which the client asserts can hold as many as
  490. 'nParts' elements. The number of parts actually found is returned.  Strings are
  491. placed in the array in order from lowest to highest.  The first pathName element
  492. beneath the root appears last.  NOTE THAT THE UNPACKED STRUCT CONTAINS POINTERS INTO
  493. THE PACKED STRUCT - DON'T DELETE OR REUSE THE PACKED STRUCT UNTIL YOU ARE FINISHED
  494. WITH THE UNPACKED STRUCT AS WELL
  495. }
  496. FUNCTION OCEUnpackPathName({CONST}VAR path: PackedPathName; VAR parts: RStringPtr; nParts: INTEGER): INTEGER;
  497.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  498.     INLINE $303C, $0330, $AA5C;
  499.     {$ENDC}
  500. {
  501. OCEPackedPathNameSize computes the number of bytes of memory needed to hold a
  502. PackedPathName manufactured from the array of parts.  This length
  503. includes the length of the length field of PackedPathName, so it
  504. is safe to do a NewPtr (OCEPackedPathNameSize(...)).
  505. }
  506. FUNCTION OCEPackedPathNameSize({CONST}VAR parts: RStringPtr; nParts: INTEGER): INTEGER;
  507.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  508.     INLINE $303C, $0328, $AA5C;
  509.     {$ENDC}
  510. { OCEDNodeNameCount returns the number of RStrings contained within the path. }
  511. FUNCTION OCEDNodeNameCount({CONST}VAR path: PackedPathName): INTEGER;
  512.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  513.     INLINE $303C, $032C, $AA5C;
  514.     {$ENDC}
  515.  
  516. {
  517. OCEPackPathName packs the parts into the storage provided as 'path'.  path must be
  518. large enough to hold the packed pathname.  A memFull error will be returned if
  519. pathLength is too small.  parts[0] should contain the deepest pathName element,
  520. and parts[nParts - 1] should contain the name of the first pathName element beneath
  521. the root. 
  522. }
  523. FUNCTION OCEPackPathName(VAR parts: RStringPtr; nParts: INTEGER; VAR path: PackedPathName; pathLength: INTEGER): OSErr;
  524.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  525.     INLINE $303C, $0323, $AA5C;
  526.     {$ENDC}
  527. {
  528. Check the equality of two packed paths.
  529. }
  530. FUNCTION OCEEqualPackedPathName({CONST}VAR path1: PackedPathName; {CONST}VAR path2: PackedPathName): BOOLEAN;
  531.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  532.     INLINE $303C, $0311, $AA5C;
  533.     {$ENDC}
  534.  
  535. {
  536. OCEValidPackedPathName checks that the packed PathName is internally consistent.
  537. Returns true if it's ok.
  538. }
  539. FUNCTION OCEValidPackedPathName({CONST}VAR path: PackedPathName): BOOLEAN;
  540.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  541.     INLINE $303C, $0334, $AA5C;
  542.     {$ENDC}
  543.  
  544. {*** DirDiscriminator ***}
  545.  
  546. TYPE
  547.     DirDiscriminatorPtr = ^DirDiscriminator;
  548.     DirDiscriminator = RECORD
  549.         signature:                OCEDirectoryKind;
  550.         misc:                    LONGINT;
  551.     END;
  552.  
  553. { Copies the value of disc1 to disc2. }
  554. PROCEDURE OCECopyDirDiscriminator({CONST}VAR disc1: DirDiscriminator; VAR disc2: DirDiscriminator);
  555.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  556.     INLINE $303C, $0301, $AA5C;
  557.     {$ENDC}
  558.  
  559. { Check the equality of two DirDiscriminators. }
  560. FUNCTION OCEEqualDirDiscriminator({CONST}VAR disc1: DirDiscriminator; {CONST}VAR disc2: DirDiscriminator): BOOLEAN;
  561.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  562.     INLINE $303C, $030D, $AA5C;
  563.     {$ENDC}
  564. {
  565. This structure is called RLI because it really contains all the info you
  566. need to locate a record within the entire name space.  It contains four fields.
  567. The first two are the name of the catalog and a catalog discriminator.  These
  568. two fields are used to indicate to which catalog a given record belongs.  The
  569. discriminator is used to distinguish between two different catalogs that have
  570. the same name.
  571.  
  572. The other two fields in the RLI structure are used to indicate a particular
  573. catalog node within the catalog specified by the directoryName and
  574. discriminator fields.  These fields are exactly analagous to the dirID and
  575. pathname used in HFS.  It is possible to specify a dNode just by dNodeNumber
  576. (pathname is nil), or just by pathname (dNodeNumber is set to kNULLDNodeNumber),
  577. or by a combination of the two.  The latter is called a 'partial pathname', and
  578. while it is valid in the Catalog Manager API, it is not supported by ADAP
  579. catalogs in Release 1.
  580.  
  581. Note that the path parameter does not include the catalog name, but holds
  582. the names of all the nodes on the path to the desired catalog node, starting
  583. with the catalog node and working its way up the tree.
  584. }
  585.  
  586. {*** RLI ***}
  587.  
  588.  
  589. TYPE
  590.     DirectoryNamePtr = ^DirectoryName;
  591.     DirectoryName = RECORD
  592.         charSet:                CharacterSet;
  593.         dataLength:                INTEGER;
  594.         body:                    PACKED ARRAY [0..31] OF Byte;            {  space for catalog name  }
  595.     END;
  596.  
  597. { Catalog node number }
  598.     DNodeNum                            = LONGINT;
  599.     RLIPtr = ^RLI;
  600.     RLI = RECORD
  601.         directoryName:            DirectoryNamePtr;                        {  pointer to the name of the catalog root  }
  602.         discriminator:            DirDiscriminator;                        {  used to discriminate between dup catalog names  }
  603.         dNodeNumber:            DNodeNum;                                {  number of the node  }
  604.         path:                    PackedPathNamePtr;                        {  old-style RLI  }
  605.     END;
  606.  
  607. {
  608. Create a new RLI from the catalog name, discriminator, DNode number, and
  609. PackedPathName.  You must allocate the storage for the RLI and pass in a pointer
  610. to it.
  611. }
  612. PROCEDURE OCENewRLI(VAR newRLI: RLI; {CONST}VAR dirName: DirectoryName; VAR discriminator: DirDiscriminator; dNodeNumber: DNodeNum; {CONST}VAR path: PackedPathName);
  613.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  614.     INLINE $303C, $031F, $AA5C;
  615.     {$ENDC}
  616.  
  617. {
  618. Duplicate the contents of rli1 to rli2.  No errors are returned. This
  619. simply copies the pointers to the catalog name and path, wiping out any pointer
  620. that you might have had in there.
  621. }
  622. PROCEDURE OCEDuplicateRLI({CONST}VAR rli1: RLI; VAR rli2: RLI);
  623.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  624.     INLINE $303C, $030B, $AA5C;
  625.     {$ENDC}
  626.  
  627. {
  628. Copy the contents of rli1 to rli2.  rli2 must already contain
  629. pointers to structures large enough to hold copies of the corresponding
  630. fields from rli1.  A memFull error will be returned if that is not the case.
  631. So if you allocate a brand new empty destination, you must at least set up
  632. its length fields.
  633. }
  634. FUNCTION OCECopyRLI({CONST}VAR rli1: RLI; VAR rli2: RLI): OSErr;
  635.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  636.     INLINE $303C, $0307, $AA5C;
  637.     {$ENDC}
  638.  
  639. {
  640. Check the equality of two RLIs.  This will take into account differences
  641. in the case and diacriticals of the directoryName and the PathName.
  642. NOTE THAT THIS WILL FAIL IF rli1 CONTAINS A DNODENUMBER AND A NIL PATHNAME,
  643. AND rli2 CONTAINS kNULLDNodeNumber AND A NON-NIL PATHNAME.  IN OTHER WORDS,
  644. THE TWO rlis MUST BE OF THE SAME FORM TO CHECK FOR EQUALITY.
  645. The one exception is that if the pathname is nil, a dNodeNumber of zero and
  646. kRootDNodeNumber will be treated as equal.
  647. }
  648. FUNCTION OCEEqualRLI({CONST}VAR rli1: RLI; {CONST}VAR rli2: RLI): BOOLEAN;
  649.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  650.     INLINE $303C, $0315, $AA5C;
  651.     {$ENDC}
  652.  
  653. {
  654. Check the validity of an RLI.  This checks that the catalog name length
  655. is within bounds, and the packed pathname (if specified) is valid.
  656. }
  657. FUNCTION OCEValidRLI({CONST}VAR theRLI: RLI): BOOLEAN;
  658.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  659.     INLINE $303C, $0337, $AA5C;
  660.     {$ENDC}
  661. {*** PackedRLI ***}
  662. {
  663. struct PackedRLI is a maximum-sized structure.  Allocate one of
  664. these and it will hold any valid packed pathname.
  665. }
  666.  
  667. CONST
  668.     kRLIMaxBytes                = 1296;
  669.  
  670.  
  671. TYPE
  672.     PackedRLIPtr = ^PackedRLI;
  673.     PackedRLI = RECORD
  674.         dataLength:                INTEGER;                                {  dataLength excludes the space for the dataLength field  }
  675.         data:                    PACKED ARRAY [0..1295] OF Byte;
  676.     END;
  677.  
  678. {
  679. struct ProtoPackedRLI is a minimum-sized structure.  Use this
  680. for a variable-length packed RLI.
  681. }
  682.     ProtoPackedRLIPtr = ^ProtoPackedRLI;
  683.     ProtoPackedRLI = RECORD
  684.         dataLength:                INTEGER;                                {  dataLength excludes the space for the dataLength field  }
  685.                                                                         {  Followed by data  }
  686.     END;
  687.  
  688. {
  689. Copy the contents of prli1 to prli2.  prli2Length is the size of prli2, and must
  690. be large enough to hold a copy of prli1.  A memFull error will be returned if that
  691. is not the case.
  692. }
  693. FUNCTION OCECopyPackedRLI({CONST}VAR prli1: PackedRLI; VAR prli2: PackedRLI; prli2Length: INTEGER): OSErr;
  694.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  695.     INLINE $303C, $0305, $AA5C;
  696.     {$ENDC}
  697.  
  698. {
  699. OCEUnpackRLI breaks apart the prli into its components, writing pointers into
  700. the rli structure.  NOTE THAT THE UNPACKED STRUCT CONTAINS POINTERS INTO THE
  701. PACKED STRUCT - DON'T DELETE OR REUSE THE PACKED STRUCT UNTIL YOU ARE FINISHED
  702. WITH THE UNPACKED STRUCT AS WELL
  703. }
  704. PROCEDURE OCEUnpackRLI({CONST}VAR prli: PackedRLI; VAR theRLI: RLI);
  705.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  706.     INLINE $303C, $0331, $AA5C;
  707.     {$ENDC}
  708.  
  709. {
  710. OCEPackedRLISize computes the number of bytes of memory needed to hold a
  711. PackedRLI manufactured from an RLI.  This length
  712. includes the length of the length field of PackedRLI, so it
  713. is safe to do a NewPtr (OCEPackedRLISize(...)).
  714. }
  715. FUNCTION OCEPackedRLISize({CONST}VAR theRLI: RLI): INTEGER;
  716.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  717.     INLINE $303C, $032A, $AA5C;
  718.     {$ENDC}
  719.  
  720. {
  721. OCEPackRLI packs the RLI into the storage provided as 'prli'.  prli must be
  722. large enough to hold the packed RLI.  A memFull error will be returned if
  723. prliLength is too small.
  724. }
  725. FUNCTION OCEPackRLI({CONST}VAR theRLI: RLI; VAR prli: PackedRLI; prliLength: INTEGER): OSErr;
  726.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  727.     INLINE $303C, $0324, $AA5C;
  728.     {$ENDC}
  729.  
  730. {
  731. OCEPackedRLIPartsSize computes the number of bytes of memory needed to hold a
  732. PackedRLI manufactured from the parts of an RLI.  This length
  733. includes the length of the length field of PackedRLI, so it
  734. is safe to do a NewPtr (OCEPackedRLIPartsSize(...)).
  735. }
  736. FUNCTION OCEPackedRLIPartsSize({CONST}VAR dirName: DirectoryName; VAR parts: RStringPtr; nParts: INTEGER): INTEGER;
  737.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  738.     INLINE $303C, $0329, $AA5C;
  739.     {$ENDC}
  740. {
  741. OCEPackRLIParts packs the parts of an RLI into the storage provided as 'prli'.
  742. prli must be large enough to hold the packed RLI.  A memFull error will be returned
  743. if prliLength is too small.
  744. }
  745. FUNCTION OCEPackRLIParts({CONST}VAR dirName: DirectoryName; {CONST}VAR discriminator: DirDiscriminator; dNodeNumber: DNodeNum; VAR parts: RStringPtr; nParts: INTEGER; VAR prli: PackedRLI; prliLength: INTEGER): OSErr;
  746.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  747.     INLINE $303C, $0325, $AA5C;
  748.     {$ENDC}
  749. {
  750. Check the equality of two packed prlis.
  751. }
  752. FUNCTION OCEEqualPackedRLI({CONST}VAR prli1: PackedRLI; {CONST}VAR prli2: PackedRLI): BOOLEAN;
  753.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  754.     INLINE $303C, $0313, $AA5C;
  755.     {$ENDC}
  756.  
  757. {
  758. Check the validity of a packed RLI.  This checks that the catalog name length
  759. is within bounds, and the packed pathname (if specified) is valid.
  760. }
  761. FUNCTION OCEValidPackedRLI({CONST}VAR prli: PackedRLI): BOOLEAN;
  762.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  763.     INLINE $303C, $0336, $AA5C;
  764.     {$ENDC}
  765. {
  766. If this packed RLI describes a Personal Catalog, this call will return a pointer
  767. to an alias record that can be used to find the actual file.  Otherwise, it returns nil.
  768. }
  769. FUNCTION OCEExtractAlias({CONST}VAR prli: PackedRLI): AliasPtr;
  770.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  771.     INLINE $303C, $0318, $AA5C;
  772.     {$ENDC}
  773. {
  774. This call returns a pointer to a packed RLI that represents the "Catalogs" icon, or
  775. the root of all catalogs.  It is used in the CollabPack.
  776. }
  777. FUNCTION OCEGetDirectoryRootPackedRLI: PackedRLIPtr;
  778.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  779.     INLINE $303C, $0346, $AA5C;
  780.     {$ENDC}
  781. {*** LocalRecordID ***}
  782.  
  783. TYPE
  784.     LocalRecordIDPtr = ^LocalRecordID;
  785.     LocalRecordID = RECORD
  786.         cid:                    CreationID;
  787.         recordName:                RStringPtr;
  788.         recordType:                RStringPtr;
  789.     END;
  790.  
  791. { Create a LocalRecordID from a name, type, and CreationID }
  792. PROCEDURE OCENewLocalRecordID({CONST}VAR recordName: RString; {CONST}VAR recordType: RString; {CONST}VAR cid: CreationID; VAR lRID: LocalRecordID);
  793.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  794.     INLINE $303C, $031E, $AA5C;
  795.     {$ENDC}
  796. {
  797. Copy LocalRecordID lRID1 to LocalRecordID lRID2.  lRID2 must already contain
  798. pointers to RString structures large enough to hold copies of the corresponding
  799. fields from lRID1.  A memFull error will be returned if that is not the case.
  800. So if you allocate a brand new empty destination, you must at least set up
  801. its length field.
  802. }
  803. FUNCTION OCECopyLocalRecordID({CONST}VAR lRID1: LocalRecordID; VAR lRID2: LocalRecordID): OSErr;
  804.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  805.     INLINE $303C, $0302, $AA5C;
  806.     {$ENDC}
  807.  
  808. {
  809. Check the equality of two local RIDs.
  810. }
  811. FUNCTION OCEEqualLocalRecordID({CONST}VAR lRID1: LocalRecordID; {CONST}VAR lRID2: LocalRecordID): BOOLEAN;
  812.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  813.     INLINE $303C, $030F, $AA5C;
  814.     {$ENDC}
  815. {*** ShortRecordID ***}
  816.  
  817. TYPE
  818.     ShortRecordIDPtr = ^ShortRecordID;
  819.     ShortRecordID = RECORD
  820.         rli:                    PackedRLIPtr;
  821.         cid:                    CreationID;
  822.     END;
  823.  
  824. { Create a ShortRecordID from an RLI struct and a CreationID }
  825. PROCEDURE OCENewShortRecordID({CONST}VAR theRLI: PackedRLI; {CONST}VAR cid: CreationID; sRID: ShortRecordIDPtr);
  826.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  827.     INLINE $303C, $0321, $AA5C;
  828.     {$ENDC}
  829.  
  830. {
  831. Copy ShortRecordID sRID1 to ShortRecordID sRID2.  sRID2 must already contain
  832. pointers to structures large enough to hold copies of the corresponding
  833. fields from sRID1.  A memFull error will be returned if that is not the case.
  834. So if you allocate a brand new empty destination, you must at least set up
  835. its length fields.
  836. }
  837. FUNCTION OCECopyShortRecordID({CONST}VAR sRID1: ShortRecordID; VAR sRID2: ShortRecordID): OSErr;
  838.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  839.     INLINE $303C, $030A, $AA5C;
  840.     {$ENDC}
  841.  
  842. {
  843. Check the equality of two short RIDs.
  844. }
  845. FUNCTION OCEEqualShortRecordID({CONST}VAR sRID1: ShortRecordID; {CONST}VAR sRID2: ShortRecordID): BOOLEAN;
  846.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  847.     INLINE $303C, $0317, $AA5C;
  848.     {$ENDC}
  849. {*** RecordID ***}
  850.  
  851. TYPE
  852.     RecordIDPtr = ^RecordID;
  853.     RecordID = RECORD
  854.         rli:                    PackedRLIPtr;                            {  pointer to a packed rli structure  }
  855.         local:                    LocalRecordID;
  856.     END;
  857.  
  858. {    Create a RecordID from a packed RLI struct and a LocalRecordID.
  859. This doesn't allocate any new space; the RecordID points to the same
  860. packed RLI struct and the same name and type RStrings. }
  861. PROCEDURE OCENewRecordID({CONST}VAR theRLI: PackedRLI; {CONST}VAR lRID: LocalRecordID; VAR rid: RecordID);
  862.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  863.     INLINE $303C, $0320, $AA5C;
  864.     {$ENDC}
  865.  
  866. {
  867. Copy RecordID RID1 to RecordID RID2.  RID2 must already contain
  868. pointers to structures large enough to hold copies of the corresponding
  869. fields from lRID1.  A memFull error will be returned if that is not the case.
  870. So if you allocate a brand new empty destination, you must at least set up
  871. its length fields.
  872. }
  873. FUNCTION OCECopyRecordID({CONST}VAR rid1: RecordID; {CONST}VAR rid2: RecordID): OSErr;
  874.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  875.     INLINE $303C, $0309, $AA5C;
  876.     {$ENDC}
  877.  
  878. {    Check the equality of two RIDs. }
  879. FUNCTION OCEEqualRecordID({CONST}VAR rid1: RecordID; {CONST}VAR rid2: RecordID): BOOLEAN;
  880.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  881.     INLINE $303C, $0314, $AA5C;
  882.     {$ENDC}
  883.  
  884. {*** PackedRecordID ***}
  885. {
  886. struct PackedRecordID is a maximum-sized structure.  Allocate one of
  887. these and it will hold any valid packed RecordID.
  888. }
  889.  
  890. CONST
  891.     kPackedRecordIDMaxBytes        = 1824;
  892.  
  893.  
  894. TYPE
  895.     PackedRecordIDPtr = ^PackedRecordID;
  896.     PackedRecordID = RECORD
  897.         dataLength:                INTEGER;                                {  dataLength excludes the space for the dataLength field  }
  898.         data:                    PACKED ARRAY [0..1823] OF Byte;
  899.     END;
  900.  
  901. {
  902. struct ProtoPackedRecordID is a minimum-sized structure.  Use this
  903. for a variable-length packed RecordID.
  904. }
  905.     ProtoPackedRecordIDPtr = ^ProtoPackedRecordID;
  906.     ProtoPackedRecordID = RECORD
  907.         dataLength:                INTEGER;                                {  dataLength excludes the space for the dataLength field  }
  908.                                                                         {  Followed by data  }
  909.     END;
  910.  
  911. {
  912. Copy PackedRecordID pRID1 to PackedRecordID pRID2.  pRID2 must already contain
  913. pointers to structures large enough to hold copies of the corresponding
  914. fields from pRID1.  A memFull error will be returned if that is not the case.
  915. pRID2Length is the number of bytes that can be put into pRID2, not counting the
  916. packed RecordID header.
  917. }
  918. FUNCTION OCECopyPackedRecordID({CONST}VAR pRID1: PackedRecordID; {CONST}VAR pRID2: PackedRecordID; pRID2Length: INTEGER): OSErr;
  919.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  920.     INLINE $303C, $0306, $AA5C;
  921.     {$ENDC}
  922.  
  923. {
  924. Create a RecordID from a PackedRecordID.
  925. NOTE THAT THE UNPACKED STRUCT CONTAINS POINTERS INTO THE PACKED STRUCT - DON'T DELETE
  926. OR REUSE THE PACKED STRUCT UNTIL YOU ARE FINISHED WITH THE UNPACKED STRUCT AS WELL
  927. }
  928. PROCEDURE OCEUnpackRecordID({CONST}VAR pRID: PackedRecordID; VAR rid: RecordID);
  929.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  930.     INLINE $303C, $0332, $AA5C;
  931.     {$ENDC}
  932.  
  933. {
  934. Create a PackedRecordID from a RecordID.  pRID must be large enough to contain
  935. the packed RecordID.  A memFull error will be returned if that is not the case.
  936. packedRecordIDLength is the number of bytes that can be put into pRID, not
  937. counting the header.
  938. }
  939. FUNCTION OCEPackRecordID({CONST}VAR rid: RecordID; VAR pRID: PackedRecordID; packedRecordIDLength: INTEGER): OSErr;
  940.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  941.     INLINE $303C, $0326, $AA5C;
  942.     {$ENDC}
  943.  
  944. {
  945. Compute the number of bytes of memory needed to hold a RecordID when packed. This
  946. length includes the length of the length field of PackedRecordID, so it
  947. is safe to do a NewPtr (OCEPackedRecordIDSize(...)).
  948. }
  949. FUNCTION OCEPackedRecordIDSize({CONST}VAR rid: RecordID): INTEGER;
  950.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  951.     INLINE $303C, $032B, $AA5C;
  952.     {$ENDC}
  953.  
  954. {
  955. Check the equality of two packed RIDs.
  956. }
  957. FUNCTION OCEEqualPackedRecordID({CONST}VAR pRID1: PackedRecordID; {CONST}VAR pRID2: PackedRecordID): BOOLEAN;
  958.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  959.     INLINE $303C, $0312, $AA5C;
  960.     {$ENDC}
  961.  
  962. { OCEValidPackedRecordID checks the validity of a packed record ID. }
  963. FUNCTION OCEValidPackedRecordID({CONST}VAR pRID: PackedRecordID): BOOLEAN;
  964.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  965.     INLINE $303C, $0335, $AA5C;
  966.     {$ENDC}
  967.  
  968. {*** DSSpec ***}
  969.  
  970. TYPE
  971.     DSSpecPtr = ^DSSpec;
  972.     DSSpec = RECORD
  973.         entitySpecifier:        RecordIDPtr;
  974.         extensionType:            OSType;
  975.         extensionSize:            INTEGER;
  976.         extensionValue:            Ptr;
  977.     END;
  978.  
  979. {
  980. struct PackedDSSpec is NOT a maximum-sized structure.  Allocate one of
  981. these and it will hold any valid packed RecordID, but not necessarily any additional
  982. data.
  983. }
  984.  
  985.  
  986. CONST
  987.     kPackedDSSpecMaxBytes        = 1832;
  988.  
  989.  
  990. TYPE
  991.     PackedDSSpecPtr = ^PackedDSSpec;
  992.     PackedDSSpec = RECORD
  993.         dataLength:                INTEGER;                                {  dataLength excludes the space for the dataLength field  }
  994.         data:                    PACKED ARRAY [0..1831] OF Byte;
  995.     END;
  996.  
  997.     PackedDSSpecHandle                    = ^PackedDSSpecPtr;
  998. {
  999. struct ProtoPackedDSSpec is a minimum-sized structure.  Use this
  1000. for a variable-length packed DSSpec.
  1001. }
  1002.     ProtoPackedDSSpecPtr = ^ProtoPackedDSSpec;
  1003.     ProtoPackedDSSpec = RECORD
  1004.         dataLength:                INTEGER;                                {  dataLength excludes the space for the dataLength field  }
  1005.                                                                         {  Followed by data  }
  1006.     END;
  1007.  
  1008. {
  1009. Copy PackedDSSpec pdss1 to PackedDSSpec pdss2.  pdss2 must already contain
  1010. pointers to structures large enough to hold copies of the corresponding
  1011. fields from pdss1.  A memFull error will be returned if that is not the case.
  1012. pdss2Length is the number of bytes that can be put into pdss2, not counting the
  1013. packed DSSpec header.
  1014. }
  1015. FUNCTION OCECopyPackedDSSpec({CONST}VAR pdss1: PackedDSSpec; {CONST}VAR pdss2: PackedDSSpec; pdss2Length: INTEGER): OSErr;
  1016.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1017.     INLINE $303C, $0303, $AA5C;
  1018.     {$ENDC}
  1019.  
  1020. {
  1021. Create a DSSpec from a PackedDSSpec.
  1022. NOTE THAT THE UNPACKED STRUCT CONTAINS POINTERS INTO THE PACKED STRUCT - DON'T DELETE
  1023. OR REUSE THE PACKED STRUCT UNTIL YOU ARE FINISHED WITH THE UNPACKED STRUCT AS WELL.
  1024. A pointer to the extension is returned in dss->extensionValue, and the length of that
  1025. extension is returned in dss->extensionSize.  If there is no extension, dss->extensionValue will
  1026. be set to nil.  This routine will unpack the RecordID (if any) into rid, unpack the rest
  1027. into dss, and set dss->entitySpecifier to rid.
  1028. }
  1029. PROCEDURE OCEUnpackDSSpec({CONST}VAR pdss: PackedDSSpec; VAR dss: DSSpec; VAR rid: RecordID);
  1030.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1031.     INLINE $303C, $032F, $AA5C;
  1032.     {$ENDC}
  1033.  
  1034. {
  1035. Create a PackedDSSpec from a DSSpec.  pdss must be large enough to
  1036. contain the packed RecordID and any extension.  A memFull error will be returned if that
  1037. is not the case.  pdssLength is the number of bytes that can be put into pdss,
  1038. not counting the header.
  1039. }
  1040. FUNCTION OCEPackDSSpec({CONST}VAR dss: DSSpec; VAR pdss: PackedDSSpec; pdssLength: INTEGER): OSErr;
  1041.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1042.     INLINE $303C, $0322, $AA5C;
  1043.     {$ENDC}
  1044.  
  1045. {
  1046. Compute the number of bytes of memory needed to hold a DSSpec when packed. This
  1047. length includes the length of the length field of PackedDSSpec, so it
  1048. is safe to do a NewPtr (OCEPackedDSSpecSize(...)).
  1049. }
  1050. FUNCTION OCEPackedDSSpecSize({CONST}VAR dss: DSSpec): INTEGER;
  1051.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1052.     INLINE $303C, $0327, $AA5C;
  1053.     {$ENDC}
  1054.  
  1055. {    Check the equality of two DSSpecs.  This compares all fields, even the
  1056. extension (unless extensionSize == 0).  The extensions are compared in a case-insensitive and
  1057. diacrit-insensitive manner. }
  1058. FUNCTION OCEEqualDSSpec({CONST}VAR pdss1: DSSpec; {CONST}VAR pdss2: DSSpec): BOOLEAN;
  1059.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1060.     INLINE $303C, $030E, $AA5C;
  1061.     {$ENDC}
  1062.  
  1063. {    Check the equality of two PackedDSSpecs.  This compares all fields, even the
  1064. extension (unless extensionSize == 0).  The extensions are compared in a case-insensitive and
  1065. diacrit-insensitive manner. }
  1066. FUNCTION OCEEqualPackedDSSpec({CONST}VAR pdss1: PackedDSSpec; {CONST}VAR pdss2: PackedDSSpec): BOOLEAN;
  1067.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1068.     INLINE $303C, $0310, $AA5C;
  1069.     {$ENDC}
  1070.  
  1071. {
  1072. Check the validity of a PackedDSSpec.  If extensionType is
  1073. 'entn', pdss must contain a valid entitySpecifier.  For all other extensionTypes, a nil
  1074. entitySpecifier is valid, but if non-nil, it will be checked for validity.  No check
  1075. is made on the extension.
  1076. }
  1077. FUNCTION OCEValidPackedDSSpec({CONST}VAR pdss: PackedDSSpec): BOOLEAN;
  1078.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1079.     INLINE $303C, $0333, $AA5C;
  1080.     {$ENDC}
  1081.  
  1082. {
  1083. Return info about a DSSpec.  This routine does not check validity.  If the
  1084. DSSpec has no extension, we determine whether it represents the root of all
  1085. catalogs, a single catalog, a DNode, or a Record.  Else it is invalid.
  1086. If the DSSpec has an extension, we simply return the extension type.
  1087. }
  1088. FUNCTION OCEGetDSSpecInfo({CONST}VAR spec: DSSpec): LONGINT;
  1089.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1090.     INLINE $303C, $0319, $AA5C;
  1091.     {$ENDC}
  1092.  
  1093. { OCEGetExtensionType returns the extensionType imbedded in the PackedDSSpec. }
  1094. FUNCTION OCEGetExtensionType({CONST}VAR pdss: PackedDSSpec): LONGINT;
  1095.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1096.     INLINE $303C, $031C, $AA5C;
  1097.     {$ENDC}
  1098. {
  1099. OCEStreamPackedDSSpec streams (flattens) a catalog object a little at a time by
  1100. calling the DSSpecStreamer routine that you provide.
  1101. }
  1102.  
  1103. TYPE
  1104.     DSSpecStreamerProcPtr = ProcPtr;  { FUNCTION DSSpecStreamer(buffer: UNIV Ptr; count: LONGINT; eof: BOOLEAN; userData: LONGINT): OSErr; }
  1105.  
  1106.     DSSpecStreamerUPP = UniversalProcPtr;
  1107.  
  1108. CONST
  1109.     uppDSSpecStreamerProcInfo = $000037E0;
  1110.  
  1111. FUNCTION NewDSSpecStreamerProc(userRoutine: DSSpecStreamerProcPtr): DSSpecStreamerUPP;
  1112.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1113.     INLINE $2E9F;
  1114.     {$ENDC}
  1115.  
  1116. FUNCTION CallDSSpecStreamerProc(buffer: UNIV Ptr; count: LONGINT; eof: BOOLEAN; userData: LONGINT; userRoutine: DSSpecStreamerUPP): OSErr;
  1117.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1118.     INLINE $205F, $4E90;
  1119.     {$ENDC}
  1120.  
  1121. TYPE
  1122.     DSSpecStreamer                        = DSSpecStreamerUPP;
  1123. FUNCTION OCEStreamPackedDSSpec({CONST}VAR dss: DSSpec; stream: DSSpecStreamer; userData: LONGINT; VAR actualCount: LONGINT): OSErr;
  1124.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1125.     INLINE $303C, $033D, $AA5C;
  1126.     {$ENDC}
  1127. {*** AttributeType ***}
  1128. {
  1129. For the record, an AttributeType is an RString with a smaller maximum size.
  1130. I don't just typedef it to an RString, because I want the definition of the AttributeType
  1131. struct to contain the max length, because I need to include it in the Attribute struct
  1132. below.  But it should be possible to typecast any AttributeType to an RString and use
  1133. all the RString utilities on it.
  1134. }
  1135.  
  1136. TYPE
  1137.     AttributeTypePtr = ^AttributeType;
  1138.     AttributeType = RECORD
  1139.         charSet:                CharacterSet;
  1140.         dataLength:                INTEGER;
  1141.         body:                    PACKED ARRAY [0..31] OF Byte;            {  always fixed at the max size  }
  1142.     END;
  1143.  
  1144. { Miscellaneous defines:  (these cannot be made into enums) }
  1145.  
  1146. CONST
  1147.     kMinPackedRStringLength        = 4;
  1148.  
  1149.     kMinPackedRLISize            = 20;
  1150.  
  1151. {*** AttributeValue ***}
  1152. { same class as is used in AppleEvents }
  1153.  
  1154. TYPE
  1155.     AttributeTag                        = DescType;
  1156.     AttributeValuePtr = ^AttributeValue;
  1157.     AttributeValue = RECORD
  1158.         tag:                    AttributeTag;
  1159.         dataLength:                LONGINT;
  1160.         bytes:                    Ptr;
  1161.     END;
  1162.  
  1163. {*** Attribute ***}
  1164.     AttributePtr = ^Attribute;
  1165.     Attribute = RECORD
  1166.         attributeType:            AttributeType;
  1167.         cid:                    AttributeCreationID;
  1168.         value:                    AttributeValue;
  1169.     END;
  1170.  
  1171. FUNCTION OCEGetIndRecordType(stringIndex: OCERecordTypeIndex): RStringPtr;
  1172.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1173.     INLINE $303C, $031B, $AA5C;
  1174.     {$ENDC}
  1175. FUNCTION OCEGetIndAttributeType(stringIndex: OCEAttributeTypeIndex): AttributeTypePtr;
  1176.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1177.     INLINE $303C, $031A, $AA5C;
  1178.     {$ENDC}
  1179.  
  1180. CONST
  1181.     _oceTBDispatch                = $AA5E;
  1182.  
  1183. {***************************************************************************************
  1184.    PLEASE NOTE! ROUTINES HAVE MOVED TO THIS HEADER!
  1185.  
  1186.    OCESizePackedRecipient, OCEPackRecipient, OCEUnpackRecipient, OCEStreamRecipient,
  1187.    OCEGetRecipientType, and OCESetRecipientType have moved to the OCE header file.
  1188.    The OCEMessaging header includes the OCE header, so no changes to your code are
  1189.    required.
  1190.  
  1191. ***************************************************************************************}
  1192.  
  1193. TYPE
  1194.     OCERecipient                        = DSSpec;
  1195.     OCERecipientPtr                     = ^OCERecipient;
  1196.  
  1197. CONST
  1198.     kOCESizePackedRecipient        = 830;
  1199.     kOCEPackRecipient            = 831;
  1200.     kOCEUnpackRecipient            = 832;
  1201.     kOCEStreamRecipient            = 833;
  1202.     kOCEGetRecipientType        = 834;
  1203.     kOCESetRecipientType        = 835;
  1204.  
  1205. {
  1206. Compute the space that a OCERecipient would take if it were in packed
  1207. form.  [Note: does NOT even pad extensionSize, so you may get an odd #back out]
  1208. Safe to pass dereferenced handle(s).
  1209. }
  1210. FUNCTION OCESizePackedRecipient({CONST}VAR rcpt: OCERecipient): INTEGER;
  1211.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1212.     INLINE $303C, $033E, $AA5C;
  1213.     {$ENDC}
  1214.  
  1215. {
  1216. Take an OCERecipient (scatter) and (gather) stream into the specified
  1217. buffer.  It is assumed that there is sufficient space in the buffer (that is
  1218. OCESizePackedRecipient).  Safe to pass dereferenced handle(s).
  1219. }
  1220. FUNCTION OCEPackRecipient({CONST}VAR rcpt: OCERecipient; buffer: UNIV Ptr): INTEGER;
  1221.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1222.     INLINE $303C, $033F, $AA5C;
  1223.     {$ENDC}
  1224. {
  1225. Take a packed OCERecipient and cast a the OCERecipient frame over it. Returns
  1226. amBadDestId if it doesn't look like an OCERecipient. Safe to pass dereferenced
  1227. handle(s).
  1228. }
  1229. FUNCTION OCEUnpackRecipient(buffer: UNIV Ptr; VAR rcpt: OCERecipient; VAR entitySpecifier: RecordID): OSErr;
  1230.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1231.     INLINE $303C, $0340, $AA5C;
  1232.     {$ENDC}
  1233. {
  1234. Take an OCERecipient (scatter) and (gather) stream using the specified
  1235. function.  Safe to pass dereferenced handle(s).  If streamer function returns
  1236. OCEError OCEStreamRecipient stops execution and passes the error back to the caller
  1237. }
  1238.  
  1239. TYPE
  1240.     OCERecipientStreamerProcPtr = ProcPtr;  { FUNCTION OCERecipientStreamer(buffer: UNIV Ptr; count: LONGINT; eof: BOOLEAN; userData: LONGINT): OSErr; }
  1241.  
  1242.     OCERecipientStreamerUPP = UniversalProcPtr;
  1243.  
  1244. CONST
  1245.     uppOCERecipientStreamerProcInfo = $000037E0;
  1246.  
  1247. FUNCTION NewOCERecipientStreamerProc(userRoutine: OCERecipientStreamerProcPtr): OCERecipientStreamerUPP;
  1248.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1249.     INLINE $2E9F;
  1250.     {$ENDC}
  1251.  
  1252. FUNCTION CallOCERecipientStreamerProc(buffer: UNIV Ptr; count: LONGINT; eof: BOOLEAN; userData: LONGINT; userRoutine: OCERecipientStreamerUPP): OSErr;
  1253.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1254.     INLINE $205F, $4E90;
  1255.     {$ENDC}
  1256.  
  1257. TYPE
  1258.     OCERecipientStreamer                = OCERecipientStreamerUPP;
  1259. FUNCTION OCEStreamRecipient({CONST}VAR rcpt: OCERecipient; stream: OCERecipientStreamer; userData: LONGINT; VAR actualCount: LONGINT): OSErr;
  1260.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1261.     INLINE $303C, $0341, $AA5C;
  1262.     {$ENDC}
  1263. { Get the OCERecipient's extensionType. Safe to pass dereferenced handle(s).}
  1264. FUNCTION OCEGetRecipientType({CONST}VAR cid: CreationID): LONGINT;
  1265.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1266.     INLINE $303C, $0342, $AA5C;
  1267.     {$ENDC}
  1268.  
  1269. {
  1270. Set the OCERecipient's extensionType in the specified cid.  (Note: we do NOT
  1271. check for a nil pointer).  If the extensionType is 'entn', the cid is assumed
  1272. to be "valid" and is not touched.  Note: to properly handle non 'entn''s this
  1273. routine must and will zero the high long (source) of the cid! Safe to pass
  1274. dereferenced handle(s).
  1275. }
  1276. PROCEDURE OCESetRecipientType(extensionType: OSType; VAR cid: CreationID);
  1277.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1278.     INLINE $303C, $0343, $AA5C;
  1279.     {$ENDC}
  1280. {***************************************************************************************
  1281.    PLEASE NOTE! ROUTINES HAVE MOVED TO THIS HEADER!
  1282.  
  1283.    OCEGetAccessControlDSSpec and its corresponding data type and constants have
  1284.    moved to the OCE header from OCEAuthDir. The OCEAuthDir header includes the OCE
  1285.    header, so no changes to your code are required.
  1286.    
  1287. ***************************************************************************************}
  1288. { access categories bit numbers }
  1289.  
  1290. CONST
  1291.     kThisRecordOwnerBit            = 0;
  1292.     kFriendsBit                    = 1;
  1293.     kAuthenticatedInDNodeBit    = 2;
  1294.     kAuthenticatedInDirectoryBit = 3;
  1295.     kGuestBit                    = 4;
  1296.     kMeBit                        = 5;
  1297.  
  1298. { Values of CategoryMask }
  1299.     kThisRecordOwnerMask        = 1;
  1300.     kFriendsMask                = 2;
  1301.     kAuthenticatedInDNodeMask    = 4;
  1302.     kAuthenticatedInDirectoryMask = 8;
  1303.     kGuestMask                    = 16;
  1304.     kMeMask                        = 32;
  1305.  
  1306.  
  1307. TYPE
  1308.     CategoryMask                        = LONGINT;
  1309. {
  1310. pass kThisRecordOwnerMask, kFriendsMask, kAuthenticatedInDNodeMask, kAuthenticatedInDirectoryMask,
  1311. kGuestMask, or kMeMask to this routine, and it will return a pointer to a
  1312. DSSpec that can be used in the Get or Set Access Controls calls.
  1313. }
  1314. FUNCTION OCEGetAccessControlDSSpec(categoryBitMask: CategoryMask): DSSpecPtr;
  1315.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1316.     INLINE $303C, $0345, $AA5C;
  1317.     {$ENDC}
  1318.  
  1319.  
  1320.  
  1321. {$ALIGN RESET}
  1322. {$POP}
  1323.  
  1324. {$SETC UsingIncludes := OCEIncludes}
  1325.  
  1326. {$ENDC} {__OCE__}
  1327.  
  1328. {$IFC NOT UsingIncludes}
  1329.  END.
  1330. {$ENDC}
  1331.